﻿using System.Reflection;

namespace _77_C_反射可能破坏单例模式
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Student student = Student.GetInstance();
            Student student1 = Student.GetInstance();

            Assembly assembly = Assembly.Load("77_C#反射可能破坏单例模式");
            Type type = assembly.GetType("_77_C_反射可能破坏单例模式.Student");
            Student student2 = Activator.CreateInstance(type,true) as Student;

            Console.WriteLine(ReferenceEquals(student1,student2));
        }
    }
}
